Skip to content

fix: enhance appId matching for prelaunch splash#1021

Draft
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/splash-appid-matching
Draft

fix: enhance appId matching for prelaunch splash#1021
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/splash-appid-matching

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor

修改说明

修复开启闪屏后鼠标点击激活 WPS/浏览器窗口未显示在最顶层的问题。

根因

闪屏请求中的 appId 与 AppIdResolver 解析出的 appId 不一致(如 com.wps.Office vs wps-office),导致真实窗口无法匹配到预创建的闪屏 wrapper,从而出现两个 SurfaceWrapper(闪屏 + 真实窗口),闪屏 wrapper 干扰窗口激活和 Z 序。

修改内容

  1. 新增 appIdCaseInsensitiveMatch 辅助函数:忽略大小写的 appId 完整比较
  2. 提取 matchPrelaunchWrapper 私有成员函数:统一 ensureXdgWrapperensureXwaylandWrapper 的匹配逻辑,三级匹配:
    • Level 1: 精确匹配
    • Level 2: 忽略大小写匹配
    • Level 3: Fallback 使用 surface 自身 appId 匹配
  3. 增加诊断日志:当 appId 匹配失败且存在未匹配的闪屏 wrapper 时输出诊断信息

测试建议

  1. 开启闪屏测试 WPS/浏览器窗口激活是否正常显示在最顶层
  2. 测试文管和终端窗口激活是否不受影响
  3. 验证 appId 忽略大小写匹配场景
  4. 检查匹配失败时的诊断日志输出

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-wm deepin-wm force-pushed the fix/splash-appid-matching branch from ea9fe22 to ffcafc0 Compare June 18, 2026 12:53
1. Add appIdCaseInsensitiveMatch helper for
   case-insensitive appId comparison
2. Extract matchPrelaunchWrapper with three-level
   matching: exact, case-insensitive, fallback using
   surface own appId
3. Unify ensureXdgWrapper and ensureXwaylandWrapper
   to use matchPrelaunchWrapper
4. Add diagnostic logging when appId matching fails
   with prelaunch wrappers present

Log: Fixed window activation issue where WPS and
browser windows do not appear on top when splash
screen is enabled

Influence:
1. Test window activation with WPS and browser when
   splash screen is enabled
2. Test window activation with file manager and
   terminal (should be unaffected)
3. Test case-insensitive appId matching scenario
4. Verify diagnostic log output when appId matching
   fails

fix: 增强闪屏appId匹配逻辑

1. 新增 appIdCaseInsensitiveMatch 辅助函数
   用于忽略大小写的 appId 比较
2. 提取 matchPrelaunchWrapper 实现三级匹配:
   精确匹配、忽略大小写匹配、fallback使用
   surface自身appId匹配
3. 统一 ensureXdgWrapper 和
   ensureXwaylandWrapper 使用 matchPrelaunchWrapper
4. 当 appId 匹配失败且存在闪屏 wrapper 时
   增加诊断日志

Log: 修复开启闪屏后鼠标点击激活WPS/浏览器
窗口未显示在最顶层的问题

Influence:
1. 测试开启闪屏时WPS和浏览器窗口激活是否
   正常显示在最顶层
2. 测试文管和终端窗口激活是否不受影响
3. 测试appId忽略大小写匹配场景
4. 验证appId匹配失败时诊断日志输出
@deepin-wm deepin-wm force-pushed the fix/splash-appid-matching branch from ffcafc0 to e7ec9af Compare June 18, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants